<?php
/**
 * 通知表数据模型
 */
class core_m_notice extends core_base_m {
	public function primarykey() {
		return 'nid';
	}
	public function tableName() {
		return core_base_Constant::TABLE_PREFIX . 'notice';
	}
	/**
	 * 发送通知
	 */
	public function sendmsg($msg){
		$msg['isread'] = 0;
		$msg['dateline'] = $this->_time;
		$msg['dateymd'] = date('Y-m-d',$this->_time);
		$rs = $this->insert($msg);
		if($rs){
			return true;
		}else{
			$this->setError($this->getDbError());
			return false;
		}
	} 
}